var theTable
var totalPage;
var pageNum;
var spanPre;
var spanNext
var spanFirst
var spanLast
var numberRowsInTable
var pageSize = 3;
var page = 1;

var echartsDiv;
var echartsDiv2;

function showStaticsTree() {
    var statisticsTreeDiv = document.getElementById("statisticsTreeDiv");
    if (statisticsTreeDiv.style.display == "none") {
        statisticsTreeDiv.style.display = "block";
    } else {
        statisticsTreeDiv.style.display = "none";
    }

    initStatisticsData();

    function initStatisticsData() {
        var datatreeStr = '[{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"土地利用现状一级分类汇总","URL":"/pages/statistics/K1new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"土地利用现状分类面积汇总","URL":"/pages/statistics/K2new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"土地利用现状一级分类面积按权属性质汇总","URL":"/pages/statistics/K3.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"城镇村及工矿用地面积汇总表","URL":"/pages/statistics/K4new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"耕地坡度分级面积汇总","URL":"/pages/statistics/K5new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"耕地种植类型面积统计","URL":"/pages/statistics/K6new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"废弃与垃圾填埋细化标注汇总统计","URL":"/pages/statistics/K17.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"即可恢复与工程恢复种植属性汇总统计","URL":"/pages/statistics/K18.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"林区范围内园地汇总统计","URL":"/pages/statistics/K7new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"灌丛草地汇总情况统计","URL":"/pages/statistics/K8new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"工业仓储用地按类型汇总统计","URL":"/pages/statistics/K9new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"可调整地类面积汇总","URL":"/pages/statistics/K10new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"部分细化地类面积汇总","URL":"/pages/statistics/K11new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"耕地细化调查情况统计","URL":"/pages/statistics/K12new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"批准未建设的建设用地用途情况统计","URL":"/pages/statistics/K13new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"批准未建设的建设用地现状情况统计","URL":"/pages/statistics/K14new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"永久基本农田现状情况统计","URL":"/pages/statistics/K15new.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"飞入地土地利用现状一级分类面积汇总","URL":"/pages/statistics/K1_Fnew.html?xzq=4509\u0026xzq2=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"飞入地土地利用现状分类面积汇总","URL":"/pages/statistics/K2_Fnew.html?xzq=4509\u0026xzq2=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"飞入地土地利用现状一级分类面积按权属性质汇总","URL":"/pages/statistics/K3_Fnew.html?xzq=4509\u0026xzq2=4509"},{"FK_EMP":"admin","WEBPATH":"Statics2.png","PNAME":"基础数据统计","NAME":"飞入地城镇村及工矿用地面积汇总表","URL":"/pages/statistics/K4_F.html?xzq=4509\u0026xzq2=4509"},{"FK_EMP":"admin","WEBPATH":"Statics3.png","PNAME":"专题数据统计","NAME":"三大类统计","URL":"/src/dataanalysisservice/zhuanxiangtongji/threetypes.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics1.png","PNAME":"土地流向统计","NAME":"一级地类流向统计","URL":"/src/dataanalysisservice/liuxiangfenxi/yijidileiliuxiangtongjidy.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics1.png","PNAME":"土地流向统计","NAME":"二级地类流向统计","URL":"/src/dataanalysisservice/liuxiangfenxi/erjidileiliuxiangtongji2.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics1.png","PNAME":"土地流向统计","NAME":"自定义地类流向统计","URL":"/src/dataanalysisservice/liuxiangfenxi/ersandiaoliuxiangduibi.html?xzq=4509"},{"FK_EMP":"admin","WEBPATH":"Statics1.png","PNAME":"土地流向统计","NAME":"专题地类流向统计","URL":"/src/dataanalysisservice/liuxiangfenxi/zhuantitongji.html?xzq=4509"}]';
        var treedata = JSON.parse(datatreeStr);

        var objAll = new Object();
        objAll.elem = "#statisticsTree";
        objAll.data = [];
        objAll.click = function(obj) {
            var title = obj.data.title
            if (title === "基础数据统计" || title === "专题数据统计" || title === "土地流向统计") {} else {
                showStatisticsTable(title);
            }
        };

        var dataTreeAll = [];
        var firstTitleLevel = [];

        for (var j = 0; j < treedata.length; j++) {
            if (firstTitleLevel.indexOf(treedata[j].PNAME) < 0) {
                firstTitleLevel.push(treedata[j].PNAME);
            }
        }
        for (var i = 0; i < firstTitleLevel.length; i++) {
            var obj = new Object();
            obj.title = firstTitleLevel[i];
            obj.children = [];
            objAll.data.push(obj);
        }
        for (var j = 0; j < treedata.length; j++) {
            for (var i in objAll.data) {
                if (treedata[j].PNAME === objAll.data[i].title) {
                    var childobj = new Object();
                    childobj.title = treedata[j].NAME;
                    objAll.data[i].children.push(childobj);
                }
            }
        }

        layui.use("tree", function() {
            var tree = layui.tree;
            tree.render(objAll);
        });

        // $("#statisticsTree").css("background-color", "white");
        // if ($("#statisticsTree")[0].style.display === "none")
        //     $("#statisticsTree").show();
        // else
        //     $("#statisticsTree").hide();
    }

    function showStatisticsTable(title) {
        document.getElementById("statisticsDIV").style.display = "block";
        //document.getElementById("labletitle").innerHTML = title;
        //$("#statisticsTable").empty();
        //$("#statisticsTableDiv").css("overflow-x", "scroll");
        // var obj = new Object();
        var xzq = "4509";
        //k1
        if (title === "土地利用现状一级分类汇总") {
            document.getElementById("statisticsTable").innerHTML = k1;
            getStatisticsData(title, xzq);
        }
        //k3
        else if (title === "土地利用现状一级分类面积按权属性质汇总") {
            document.getElementById("statisticsTable").innerHTML = k3;
            getStatisticsData3(title, xzq);
        }
        //k5
        else if (title === "耕地坡度分级面积汇总") {
            document.getElementById("statisticsTable").innerHTML = k5;
            getStatisticsData5(title, xzq);
        }
        //k6
        else if (title === "耕地种植类型面积统计") {
            document.getElementById("statisticsTable").innerHTML = k6;
            getStatisticsData6(title, xzq);
        }
        //k7
        else if (title === "林区范围内园地汇总统计") {
            document.getElementById("statisticsTable").innerHTML = k7;
            getStatisticsData7(title, xzq);
        }
        //k8
        else if (title === "灌丛草地汇总情况统计") {
            document.getElementById("statisticsTable").innerHTML = k8;
            getStatisticsData8(title, xzq);
        }
        //k9
        else if (title === "工业仓储用地按类型汇总统计") {
            document.getElementById("statisticsTable").innerHTML = k9;
            getStatisticsData9(title, xzq);
        }
        //k10
        else if (title === "可调整地类面积汇总") {
            document.getElementById("statisticsTable").innerHTML = k10;
            getStatisticsData10(title, xzq);
        }
        //k11
        else if (title === "部分细化地类面积汇总") {
            document.getElementById("statisticsTable").innerHTML = k11;
            getStatisticsData11(title, xzq);
        }
        //k12
        else if (title === "耕地细化调查情况统计") {
            document.getElementById("statisticsTable").innerHTML = k12;
            getStatisticsData12(title, xzq);
        }
        //k13
        else if (title === "批准未建设的建设用地用途情况统计") {
            document.getElementById("statisticsTable").innerHTML = k13;
            getStatisticsData13(title, xzq);
        }
        //k14
        else if (title === "批准未建设的建设用地现状情况统计") {
            document.getElementById("statisticsTable").innerHTML = k14;
            getStatisticsData14(title, xzq);
        }
        //k15
        else if (title === "永久基本农田现状情况统计") {
            document.getElementById("statisticsTable").innerHTML = k15;
            getStatisticsData15(title, xzq);
        }
        //k17
        else if (title === "废弃与垃圾填埋细化标注汇总统计") {
            document.getElementById("statisticsTable").innerHTML = k17;
            getStatisticsData17(title, xzq);
        }
        //k18
        else if (title === "即可恢复与工程恢复种植属性汇总统计") {
            document.getElementById("statisticsTable").innerHTML = k18;
            getStatisticsData18(title, xzq);
        }
        //三大类
        else if (title === "三大类统计") {
            document.getElementById("statisticsTable").innerHTML = threeType;
            getStatisticsDataThreeType(title, xzq);
        }
        //一级地类流向
        else if (title === "一级地类流向统计") {
            document.getElementById("statisticsDIV").style.height = "85%";
            document.getElementById("statisticsTable").innerHTML = yijidilei;
            getStatisticsDataYijidilei(title, xzq);
        }
        //二级地类流向
        else if (title === "二级地类流向统计") {
            document.getElementById("statisticsTable").innerHTML = erjidilei;
            getStatisticsDataErjidilei(title, xzq);
        }
        //k2
        else if (title === "土地利用现状分类面积汇总") {
            document.getElementById("statisticsTable").innerHTML = k2;
            getStatisticsData2(title, xzq);
        }
        //专题统计
        else if (title === "专题地类流向统计") {
            document.getElementById("statisticsTable").innerHTML = zhuanti;
            getStatisticsDataZhuanTi(title, xzq);
        }

    }

    this.getStatisticsData = function(title, xzq) {
        $("#table2").empty();
        var obj = obj2 = {
            stype: "K1",
            mtype: "数据表",
            xzq: xzq
        };
        var perValue = [];
        var perSumValue = [];
        var myparam = "";
        nameArr =   ["湿地", "耕地", "种植园用地", "林地", "草地", "商业服务业用地", "工矿用地", "住宅用地", "公共管理与公共服务用地", "特殊用地", "交通运输用地", "水域及水利设施用地", "其他土地"];

        $.ajax({
            type:   "post",
            async:  false,
            //url:   "http://192.168.1.13:8014/Ajax.ashx",
            url:   "http://localhost:8081/tddc/statis",
            data:  obj, //发送到服务器的参数
            datatype:   "json",
            success:   function (result)  {
                if  (result)  {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];

                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    myparam = perValue1[0].MC;
                    var tbody = document.getElementById('table2');

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据
                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                            //trow.setAttribute("onclick","alert(22)");
                        } else {
                            trow.setAttribute("onclick", "");
                        }
                        tbody.appendChild(trow);
                    }
                }
                statisticepage();
            }
        });

        var value1 = [];
        var xAxis1 = [];
        $.ajax({        
            type:   "post",
                    async:  false,
                    url:   "http://192.168.1.13:8014/Ajax.ashx",
                    data:  obj,
                    datatype:   "json",
                    success:   function (result)  {            
                if  (result)  {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    var Landtype;
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            Fathervalue = strs[0];
                        else if (i == 1)
                            Childvalue = strs[1];
                        // else
                        //     Landtype = strs[2];
                    }
                    var fathervalue = JSON.parse(Fathervalue);
                    var childvalue = JSON.parse(Childvalue);
                    // var landtype = JSON.parse(Landtype);
                    var newfathervalue = [];
                    var newlandtype = [];

                    for (var i in fathervalue[0]) {
                        if (i == "MC" || i == "DM" || i.match("_") || i.match("ZMJ"))
                            continue;
                        newfathervalue.push(fathervalue[0][i]);
                    }
                    var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    echartsDiv = document.getElementById("bardiv");
                    EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, nameArr,  newfathervalue, "面积", EchartsTitle);

                    var newlandtypeValue = [];
                    for (var i = 0; i < nameArr.length; i++) {
                        var obj = new Object();
                        obj.name = nameArr[i];
                        obj.value =  newfathervalue[i];
                        newlandtypeValue.push(obj);
                    }
                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    echartsDiv2 = document.getElementById("piediv");
                    EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, nameArr, newlandtypeValue, "面积");

                                    
                }            
            }

                    
        });
        function exportfiles() {
            $.ajax({
                type: "post",
                async: false,
                url: "http://192.168.1.13:8014/Ajax.ashx",
                data: //发送到服务器的参数
                    {
                    stype: "导出文件",
                    mtype: "K1",
                    xzq: xzq,
                    filepath: "E:/exportfiles/" + myparam + "土地利用现状一级分类面积汇总表.xlsx",
                    templatepath: "/data/ExcelModel/土地利用现状一级分类面积汇总表.xlsx",
                    row: 4,
                    order: 0
                },
                datatype: "json",
                success: function (result) {
                    alert("导出文件成功！");
                }
            });

        }
    }

    this.getStatisticsData2 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];

        var Landtype = []; //二级地类
        var Fatherlandtype = []; //一级地类
        var FatherName = [];
        var Childvalue = [];
        var hejiData;


        var Myland = [];
        var Theparam = "";
        var mylandvalue = [];

        var newValue = [];
        var mynums = [];

        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
                stype: "K2",
                mtype: "新数据",
                xzq: xzq,
                text: "'湿地'"
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            Landtype = strs[2];
                        else if (i == 3)
                            Fatherlandtype = strs[3];
                        else if (i == 4)
                            Myland = strs[4];
                        else
                            Theparam = strs[5];
                    }
                    var perSumValue = JSON.parse(perSumValue);

                    var perValue1 = JSON.parse(perValue);
                    hejiData = perValue1;
                    var landtype = JSON.parse(Landtype);
                    var fatherlandtype = JSON.parse(Fatherlandtype);
                    var myland = JSON.parse(Myland);
                    var newmyland = [];
                    for (var i = 0; i < myland.length; i++) {
                        newmyland.push(myland[i].FD_VALUE);
                    }
                    var theparam = "K" + Theparam;
                    for (var i = 0; i < fatherlandtype.length; i++) {
                        //var newOption = document.createElement("option");
                        if (fatherlandtype[i].FD_VALUE == "特殊用地")
                            continue;
                        //newOption.text = fatherlandtype[i].FD_VALUE;
                        FatherName.push(fatherlandtype[i].FD_VALUE);
                        //document.getElementById("selection").add(newOption);
                    }

                    var tbody = document.getElementById('table2');

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 

                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData2(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }

                    for (var i in perValue1[0]) {
                        if (i.indexOf(theparam) != -1)
                            mylandvalue.push(perValue1[0][i]);
                    }
                    mylandvalue.shift();
                    var mypercent = [];
                    for (var i = 0; i < myland.length; i++) {
                        mypercent.push(Number(mylandvalue[i] / perValue1[0].K01).toFixed(3));
                    }
                    for (var i in hejiData[0]) {
                        if (i == "SUM(K09)" || i == "K09")
                            continue;
                        //                       if(i.length == 8 && i.indexOf('K')>=0){
                        //                           newValue.push(hejiData[0][i]);
                        //                       }

                        if (i.match("SUM")) {
                            if (i.match("K") && i.length == 8) {
                                newValue.push(hejiData[0][i]);
                            }
                        } else {
                            if (i.match("K") && i.length == 3) {
                                newValue.push(hejiData[0][i]);
                            }
                        }

                    }



                    for (var i = 0; i < FatherName.length; i++) {             
                        var obj1 = new Object();              
                        obj1.name = FatherName[i];              
                        obj1.value = newValue[i];              
                        mynums.push(obj1);
                    }


                    var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, FatherName, newValue, "面积", EchartsTitle);


                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, FatherName, mynums, "面积");
                }
                statisticepage();
            }
        });
    }

    this.getStatisticsData3 = function(title, xzq) {
        $("#table2").empty();
        var obj = {
            stype: "K3",
            mtype: "数据表",
            xzq: xzq
        };
        var obj2 = {
            stype: "K3",
            mtype: "堆叠柱状图",
            xzq: xzq
        };
        var perValue = [];
        var perSumValue = [];
        var myparam = "";
        nameArr =   ["湿地", "耕地", "种植园用地", "林地", "草地", "商业服务业用地", "工矿用地", "住宅用地", "公共管理与公共服务用地", "特殊用地", "交通运输用地", "水域及水利设施用地", "其他土地"];

        $.ajax({
            type:   "post",
            async:  false,
            url:   "http://192.168.1.13:8014/Ajax.ashx",
            data:  obj, //发送到服务器的参数
            datatype:   "json",
            success:   function (result)  {
                if  (result)  {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];

                    }
                    var perValue1 = JSON.parse(perValue);
                    var perSumValue = JSON.parse(perSumValue);

                    //myparam = perValue1[0].MC;
                    var tbody = document.getElementById('table2');

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据
                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData3(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");

                        } else {
                            trow.setAttribute("onclick", "");
                        }
                        tbody.appendChild(trow);
                    }

                }
                statisticepage();
            }

        });

        var value1 = [];
        var xAxis1 = [];
        var typenames = []; //地的类型
        var xingzhengqudata = []; //x坐标值
        var seriesdata = []; //y坐标值

        $.ajax({        
            type:   "post",
                    async:  false,
                    url:   "http://192.168.1.13:8014/Ajax.ashx",
                    data:  obj2,
                    datatype:   "json",
                    success:   function (result)  {            
                if  (result)  {
                    var names = []; //
                    var nums = [];

                    var data1 = []; //国家所有
                    var data2 = []; //集体所有

                    var perValue = JSON.parse(result);
                    for (var i = 0; i < perValue.length; i++) { //遍历一下json数据                     
                        var perValue1 = perValue[i];
                        xingzhengqudata.push(perValue1.prov);
                        data1.push(perValue1.dataval);
                        data2.push(perValue1.dataval2);
                    }
                }
                var seriesdatas1 = new Object();
                seriesdatas1["name"] = '国家所有';
                seriesdatas1["type"] = 'bar';
                seriesdatas1["data"] = data1;
                seriesdatas1["itemStyle"] = {
                    normal: {
                        label: {
                            show: true, //开启显示
                            position: 'top', //在上方显示
                            textStyle: { //数值样式
                                color: 'white',
                                fontSize: 12
                            }
                        }
                    }
                };
                seriesdata.push(seriesdatas1);
                var seriesdatas2 = new Object();
                seriesdatas2["name"] = '集体所有';
                seriesdatas2["type"] = 'bar';
                seriesdatas2["data"] = data2;
                seriesdatas2["itemStyle"] = {
                    normal: {
                        label: {
                            show: true, //开启显示
                            position: 'top', //在上方显示
                            textStyle: { //数值样式
                                color: 'white',
                                fontSize: 12
                            }
                        }
                    }
                };
                //document.getElementById("EchartsBarDiv").style.display = "block";

                seriesdata.push(seriesdatas2);

                var echartsDiv = document.getElementById("bardiv");

                showEchartsBar2(echartsDiv, xingzhengqudata, seriesdata, "面积");

                var names = [];            
                var nums = [];
                var data = []; //存放解析结果的数值
                var data2 = []; //存放解析结果的百分比  
                var s = 0;
                var obj = JSON.parse(result);

                for (var i = 0; i < obj.length; i++) {
                    data.push(obj[i].dataval);
                    s = s + data[i];;
                }
                for (var i = 0; i < obj.length; i++) {
                    var d = Number(obj[i].dataval / s).toFixed(2);
                    data2.push(d);
                }
                for (var i = 0; i < obj.length; i++) {
                    names.push(obj[i].prov);                
                    var obj1 = new Object();                
                    obj1.name = obj[i].prov;                
                    obj1.value = obj[i].dataval;                
                    nums.push(obj1);
                }
                //document.getElementById("EchartsPieDiv").style.display = "block";
                var echartsDiv2 = document.getElementById("piediv");
                EchartsTitle = title + "饼形图";
                //document.getElementById("echartslable").innerHTML = EchartsTitle;
                showEchartsPie(echartsDiv2, names, nums, "面积");
            }
        })        
    }

    this.getStatisticsData5 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perSumValue = [];
        var Farmland = [];
        var x = [];
        var y = [];
        var myparam = "";
        var data1 = [];
        var data2 = [];
        var obj = {
            stype: "K5",
            mtype: "数据表",
            xzq: xzq
        };
        var obj2 = {
            stype: "K3",
            mtype: "堆叠柱状图",
            xzq: xzq
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            Farmland = strs[2];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var farmland = JSON.parse(Farmland);

                    for (var i = 0; i < farmland.length; i++) {
                        x.push(farmland[i].FD_VALUE);
                    }
                    for (var i = 0; i < perSumValue.length; i++) {
                        for (var j in perSumValue[i]) {
                            if (j.match("PDMJ") || j.match("_HJ"))
                                y.push(perSumValue[i][j]);
                        }
                    }

                    for (var k in perSumValue[0]) {
                        if (k.match("_PD"))
                            data1.push(perSumValue[0][k]);
                        if (k.match("_TT"))
                            data2.push(perSumValue[0][k]);
                    }

                    var tbody = document.getElementById('table2');
                    myparam = perSumValue[0].MC;
                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);
                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 

                        if ((perValue1[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData5(" + "'" + title + "'" + "," + "'" + perValue1[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }
                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, x, y, "面积");

                    var newlandtypeValue = [];
                    for (var i = 0; i < x.length; i++) {
                        var obj = new Object();
                        obj.name = x[i];
                        obj.value = y[i];
                        newlandtypeValue.push(obj);
                    }
                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, x, newlandtypeValue, "面积");

                }
                statisticepage();
            }

        });     
    }

    this.getStatisticsData6 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perSumValue = [];
        var Farmland = [];
        var x = [];
        var y = [];
        var myparam = "";
        var data1 = [];
        var data2 = [];
        var obj = {
            stype: "K6",
            mtype: "新数据",
            xzq: xzq,
            text: "'耕地'"
        };
        var obj2 = {
            stype: "K3",
            mtype: "堆叠柱状图",
            xzq: "4509"
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            fathertype = strs[2];
                        else if (i == 3)
                            childtype = strs[3];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var fathertype1 = JSON.parse(fathertype);
                    var childtype1 = JSON.parse(childtype);
                    var tbody = document.getElementById('table2');
                    myparam = perSumValue[0].MC;

                    // for (var i = 0; i < fathertype1.length; i++) {
                    //     var newOption = document.createElement("option");
                    //     newOption.text = fathertype1[i].FD_VALUE;
                    //     document.getElementById("selection").add(newOption);
                    // }

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 

                        if ((perValue1[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData6(" + "'" + title + "'" + "," + "'" + perValue1[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }

                    var data1 = []; //耕地
                    var data2 = []; //水田
                    var data3 = []; //水浇地
                    var data4 = []; //旱地
                    var data = [];
                    var childdata = [];

                    for (var i = 0; i < childtype1.length; i++) {
                        childdata.push(childtype1[i].FIELDALIASNAME.split('_')[1]);
                    }

                    var nums = [];

                    for (var i in perSumValue[0]) { //遍历一下json数据                     
                        if (i.match("K01_"))
                            data1.push(perSumValue[0][i]);
                        if (i.match("K0101_"))
                            data2.push(perSumValue[0][i]);
                        if (i.match("K0102_"))
                            data3.push(perSumValue[0][i]);
                        if (i.match("K0103_"))
                            data4.push(perSumValue[0][i]);
                    }

                    for (var i = 0; i < childdata.length; i++) {
                        var obj1 = new Object();
                        obj1.name = childdata[i];
                        obj1.value = data1[i];
                        nums.push(obj1);
                    }

                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, childdata, data1, "面积");

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, childdata, nums, "面积");
                }
                statisticepage();
            }


        });        
    }

    this.getStatisticsData7 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var myparam = "";
        var obj = {
            stype: "K7",
            mtype: "数据表",
            xzq: xzq
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var tbody = document.getElementById('table2');
                    myparam = perValue1[0].MC;

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据

                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData7(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }
                }
                statisticepage();
            }

        });



        var value1 = [];
        var xAxis1 = [];
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data:   //发送到服务器的参数
            {
                stype: "K7",
                mtype: "新柱状图",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            Fathervalue = strs[0];
                        else if (i == 1)
                            Childvalue = strs[1];
                        else
                            Landtype = strs[2];
                    }

                    var fathervalue = JSON.parse(Fathervalue);
                    var childvalue = JSON.parse(Childvalue);
                    var landtype = JSON.parse(Landtype);
                    var newfathervalue = [];
                    var newlandtype = [];

                    for (var i in fathervalue[0]) {
                        if (i.indexOf("K") >= 0) {
                            newfathervalue.push(fathervalue[0][i]);
                        }
                    }

                    for (var i in landtype) {
                        newlandtype.push(landtype[i].FD_VALUE);
                    }

                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, newlandtype,  newfathervalue, "面积");
                }
            }

        });


        var data = []; //存放解析结果的数值
        var data2 = []; //存放解析结果的百分比

        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data:   //发送到服务器的参数
            {
                stype: "K7",
                mtype: "新柱状图",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            Fathervalue = strs[0];
                        else if (i == 1)
                            Childvalue = strs[1];
                        else
                            Landtype = strs[2];
                    }
                    var fathervalue = JSON.parse(Fathervalue);
                    var childvalue = JSON.parse(Childvalue);
                    var landtype = JSON.parse(Landtype);
                    var newfathervalue = [];
                    var newlandtype = [];
                    for (var i in fathervalue[0]) {
                        newfathervalue.push(fathervalue[0][i]);
                    }
                    for (var i in landtype) {
                        newlandtype.push(landtype[i].FD_VALUE);
                    }

                    var names = [];
                    var nums = [];

                    for (var i = 0; i < newlandtype.length; i++) {
                        data.push(newfathervalue[i + 3]);
                    }

                    for (var i = 0; i < newlandtype.length; i++) {
                        var d = Number(newfathervalue[i + 3] / newfathervalue[2]).toFixed(3);
                        data2.push(d);
                    }
                    for (var i = 0; i < newlandtype.length; i++) {
                        //names.push(obj[i].prov);
                        var obj1 = new Object();
                        obj1.name = newlandtype[i];
                        obj1.value = newfathervalue[i + 3];
                        nums.push(obj1);
                    }

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, newlandtype, nums, "面积");
                }
            }

        });
    }

    this.getStatisticsData8 = function(title, xzq) {
        $("#table2").empty();
        var x = [];
        var obj = {
            stype: "K8",
            mtype: "数据表",
            xzq: xzq
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            Grassland = strs[2];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var grassland = JSON.parse(Grassland);
                    for (var i = 0; i < grassland.length; i++) {
                        x.push(grassland[i].FD_VALUE);
                    }
                    var tbody = document.getElementById('table2');

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 
                        var dm = perValue1[i].DM;
                        if ((perValue1[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData8(" + "'" + title + "'" + "," + "'" + perValue1[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }

                    var nums = [];
                    var data = []; //天然牧草地

                    for (var i in perSumValue[0]) { //遍历一下json数据                     
                        if (i.match("KGCCD04_"))
                            data.push(parseInt(perSumValue[0][i]));
                    }
                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, x, data, "面积");

                    for (var i = 0; i < x.length; i++) {                
                        var obj1 = new Object();                
                        obj1.name = x[i];                
                        obj1.value = data[i];                
                        nums.push(obj1);
                    }
                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, x, nums, "面积");


                }
                statisticepage();
            }
        })

    }

    this.getStatisticsData9 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var myparam = "";
        var obj = {
            stype: "K9",
            mtype: "数据表",
            xzq: xzq
        }
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var tbody = document.getElementById('table2');
                    myparam = perValue1[0].MC;

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据
                    tbody.appendChild(trow);

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据
                        if ((perValue1[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData9(" + "'" + title + "'" + "," + "'" + perValue1[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }

                        tbody.appendChild(trow);
                    }
                }
                statisticepage();
            }

        });


        var value1 = [];
        var xAxis1 = [];
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data:   //发送到服务器的参数
            {
                stype: "K9",
                mtype: "新图",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            Fathervalue = strs[0];
                        else if (i == 1)
                            Childvalue = strs[1];
                    }

                    var fathervalue = JSON.parse(Fathervalue);
                    var childvalue = JSON.parse(Childvalue);
                    var newfathervalue = [];

                    for (var i in fathervalue[0]) {
                        if (i.match("SUM")) {
                            if (i.match("K06H")) {
                                newfathervalue.push(fathervalue[0][i]);
                            }
                        } else {
                            if (i.match("K06H")) {
                                newfathervalue.push(fathervalue[0][i]);
                            }
                        }

                    }
                    //var EchartsTitle = "";
                    var nameArr = ["火电工业用地", "钢铁工业用地", "煤矿工业用地", "水泥工业用地", "玻璃工业用地", "电解铝工业用地"]
                        //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, nameArr,  newfathervalue, "面积");


                    var names = [];
                    var nums = [];
                    var data = []; //存放解析结果的数值
                    var data2 = []; //存放解析结果的百分比


                    for (var i = 0; i < nameArr.length; i++) {
                        data.push(nameArr[i]);
                    }

                    for (var i = 0; i < nameArr.length; i++) {
                        var d = Number(newfathervalue[i] / newfathervalue[i]).toFixed(3);
                        data2.push(d);
                    }
                    for (var i = 0; i < nameArr.length; i++) {
                        //names.push(obj[i].prov);
                        var obj1 = new Object();
                        obj1.name = nameArr[i];
                        obj1.value = newfathervalue[i + 3];
                        nums.push(obj1);
                    }

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, nameArr, nums, "面积");




                }
            }

        });


    }

    this.getStatisticsData10 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var obj = {
            stype: "K10",
            mtype: "数据表",
            xzq: xzq
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var tbody = document.getElementById('table2');
                    myparam = perSumValue[0].MC;
                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 
                        if ((perValue1[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData10(" + "'" + title + "'" + "," + "'" + perValue1[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }

                        tbody.appendChild(trow);
                    }
                }
                statisticepage();
            }

        });

        var value1 = [];
        var xAxis1 = [];
        var data = []; //存放解析结果的数值
        var data2 = []; //存放解析结果的百分比  

        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
                stype: "K10",
                mtype: "新柱状图",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    for (var i in perSumValue[0]) {
                        value1.push(perSumValue[0][i]); //遍历月份并填入数组
                    }
                    value1.shift();
                    value1.shift();
                    value1.shift();
                    for (var j = 0; j < perValue1.length; j++) {
                        xAxis1.push(perValue1[j].FD_VALUE); //遍历月份并填入数组
                    }
                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, xAxis1, value1, "面积");



                    var names = [];
                    var nums = []; //存放pie的对象
                    var s = 0;
                    for (var i = 0; i < value1.length; i++) {
                        data.push(value1[i]);
                        s = s + parseFloat(data[i]);
                    }
                    for (var i = 0; i < value1.length; i++) {
                        //var d=Number(obj[i].dataval/s*100).toFixed(2);
                        //d=d+"%";
                        //d=parseFloat(d);
                        var d = Math.round(value1[i] * 100 / s) / 100;
                        data2.push(d);
                    }

                    for (var i = 0; i < value1.length; i++) {
                        //names.push(obj[i].prov);
                        var obj1 = new Object();
                        obj1.name = xAxis1[i];
                        obj1.value = value1[i];
                        nums.push(obj1);
                    }

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, xAxis1, nums, "面积");

                }
            }

        });
    }

    this.getStatisticsData11 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var myparam = "";
        var obj = {
            stype: "K11",
            mtype: "数据表",
            xzq: xzq
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var tbody = document.getElementById('table2');
                    myparam = perValue1[0].MC;
                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }
                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData11(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }

                        tbody.appendChild(trow);

                    }
                }
                statisticepage();
            }

        });

        var name1 = [];
        var name2 = [];
        var value1 = [];
        var value2 = [];
        var xAxis1 = [];
        var xnames = [];
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
                stype: "K11",
                mtype: "新柱状图",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perValue = JSON.parse(perValue);
                    var perSumValue = JSON.parse(perSumValue);

                    for (var i = 0; i < perSumValue.length; i++) {
                        //value1.push(perValue[i].dataval);    //遍历月份并填入数组
                        xAxis1.push(perSumValue[i].FD_VALUE);
                    }

                    for (var i in perValue[0]) {
                        if (i == "DM" || i == "MC" || i.match("_HJ"))
                            continue;

                        if (i.match("K20")) {
                            value2.push(perValue[0][i]);
                        } else {
                            value1.push(perValue[0][i]);
                        }
                    }

                    for (var i = 0; i < xAxis1.length; i++) {
                        if (i <= 3)
                            name1.push(xAxis1[i]);
                        else
                            name2.push(xAxis1[i]);
                    }
                    //var EchartsTitle = "";
                    //document.getElementById("echartslable").innerHTML = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv,  name1,  value1, "面积");

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    showEchartsBar(echartsDiv2,  name2,  value2, "面积");


                }
            }
        });




    }

    this.getStatisticsData12 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var obj = {
            stype: "K12",
            mtype: "数据表",
            xzq: xzq
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {

                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var tbody = document.getElementById('table2');
                    myparam = perSumValue[0].MC;
                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 

                        if ((perValue1[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData12(" + "'" + title + "'" + "," + "'" + perValue1[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }

                        tbody.appendChild(trow);
                    }
                }
                statisticepage();
            }

        });

        var value1 = [];
        var xAxis1 = [];
        var total;
        var zhu1 = []; //柱状图横坐标名字
        var zhu2 = []; //柱状图地类
        var zhu3 = []; //柱状图值
          
        $.ajax({                
            type:   "post",
                            async:  false,
                            url:   "http://192.168.1.13:8014/Ajax.ashx",
                            data:   //发送到服务器的参数
            {
                stype: "K12",
                mtype: "新柱状图",
                xzq: xzq
            },
                            datatype:   "json",
                            success:   function (result)  {                    
                if  (result)  {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            zhu1 = strs[0];
                        else if (i == 1)
                            zhu2 = strs[1];
                        else if (i == 2)
                            zhu3 = strs[2];
                    }
                    zhu1 = JSON.parse(zhu1);
                    zhu2 = JSON.parse(zhu2);
                    zhu3 = JSON.parse(zhu3);
                    var bardata1 = [];
                    var bardata2 = [];
                    var bardata3 = [];
                    var bardata4 = [];
                    var bardata5 = [];
                    var legenddata = [];
                    var seriousdata = [];
                    bardata5.push(bardata1);
                    bardata5.push(bardata2);
                    bardata5.push(bardata3);
                    bardata5.push(bardata4);
                    for (var l = 0; l < zhu3.length; l++) {
                        legenddata.push(zhu3[l].FD_VALUE)
                    }
                    for (var h = 0; h < zhu2.length; h++) {
                        xAxis1.push(zhu2[h].FD_VALUE);
                    }
                    for (var i in zhu1[0]) {
                        value1.push(zhu1[0][i]);
                    }
                    value1.shift();
                    value1.shift();
                    total = value1[0];
                    value1.shift();
                    for (var j = 0; j < zhu2.length; j++) {
                        bardata1.push(value1[j * 4]);
                        bardata2.push(value1[j * 4 + 1]);
                        bardata3.push(value1[j * 4 + 2]);
                        bardata4.push(value1[j * 4 + 3]);
                    }
                    var o = {};
                    for (var k = 0; k < zhu3.length; k++) {
                        var o = new Object();
                        o["name"] = zhu3[k].FD_VALUE.toString();
                        o["type"] = 'bar';
                        o["data"] = bardata5[k];
                        o["itemStyle"] = {
                            normal: {
                                label: {
                                    show: true, //开启显示
                                    position: 'top', //在上方显示
                                    textStyle: { //数值样式
                                        color: 'white',
                                        fontSize: 12
                                    }
                                }
                            }
                        };
                        seriousdata.push(o);
                    }
                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar2(echartsDiv, xAxis1, seriousdata, "面积");

                    var data = []; //存放解析结果的数值
                    var data2 = []; //存放解析结果的百分比  
                    var a1, a2, a3, a4, a5 = 0;
                    var names = [];             
                    var nums = [];
                    var a6 = [];
                    a6.push(a1);
                    a6.push(a2);
                    a6.push(a3);
                    a6.push(a4);
                    a6.push(a5);
                    for (var m = 0; m < xAxis1.length; m++) {
                        a6[m] = parseFloat(value1[m * 4 + 0]);
                    }
                    for (var i = 0; i < xAxis1.length; i++) {
                        var d = Number(a6[i] / total).toFixed(2);
                        data2.push(d);
                    }
                    for (var i = 0; i < xAxis1.length; i++) {                
                        var obj1 = new Object();                
                        obj1.name = xAxis1[i];                
                        obj1.value = a6[i];                
                        nums.push(obj1);
                    }

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, xAxis1, nums, "面积");


                                        
                }                
            }

                        
        });


    }

    this.getStatisticsData13 = function(title, xzq) {
        $("#table2").empty();
        var obj = {
            stype: "K13",
            mtype: "数据表",
            xzq: xzq
        }
        var perValue = [];
        var perColName = [];

        var value1 = []; //柱状图纵坐标（一级地类）
        var xAxis1 = []; //柱状图横轴（一级地类）
        var code1 = []; //一级地类编码
        var code2 = []; //二级地类编码
        var str1 = ""; //code1拼成字符串
        var str2 = ""; //code2拼成字符串
        var yijiname = null; //一级地类json
        var erjiname = null; //二级地类json 
        var arrayyiji = []; //一级地类数组   
        var arrayerji = []; //二级地类数组
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    myparam = perValue1[0].MC;
                    var tbody = document.getElementById('table2');

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData13(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }

                    for (var i in perValue1[0]) {
                        if (i.match("SUM")) {
                            if (i.match("K") && i.length == 8) {
                                value1.push(perValue1[0][i]);
                                code1.push("'" + i.substring(5, i.length - 1) + "'");
                            }
                            if (i.match("K") && i.length != 8) {
                                code2.push("'" + i.substring(5, i.length - 1) + "'");
                            }
                        } else {
                            if (i.match("K") && i.length == 3) {
                                value1.push(perValue1[0][i]);
                                code1.push("'" + i.substring(1) + "'");
                            }
                            if (i.match("K") && i.length != 3) {
                                code2.push("'" + i.substring(1) + "'");
                            }
                        }
                    }

                    for (var i = 0; i < code1.length; i++) {
                        str1 = str1 + "+" + code1[i];
                    }
                    //str1 = str1.substr(1); 
                    for (var i = 0; i < code2.length; i++) {
                        str2 = str2 + "+" + code2[i];
                    }
                    //str2 = str2.substr(1); 

                }
                statisticepage();
            }

        });

        $.ajax({            
            type:   "post",
                        async:  false,
                        url:   "http://192.168.1.13:8014/Ajax.ashx",
                        data:   //发送到服务器的参数
            {
                stype: "K13",
                mtype: "新柱状图",
                xzq: xzq,
                str1: str1,
                str2: str2
            },
                            datatype:   "json",
                            success:   function (result)  {                    
                if  (result)  {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            yijiname = strs[0];
                        else if (i == 1)
                            erjiname = strs[1];
                    }
                    yijiname = JSON.parse(yijiname);
                    erjiname = JSON.parse(erjiname);
                    for (var i = 0; i < yijiname.length; i++) {
                        arrayyiji.push(yijiname[i].FD_VALUE);
                    }
                    for (var i = 0; i < erjiname.length; i++) {
                        arrayerji.push(erjiname[i].FD_VALUE);
                    }
                    var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv,  arrayyiji,  value1, "面积");

                    var data = []; //存放解析结果的数值
                    var data2 = []; //存放解析结果的百分比  

                    var names = [];             
                    var nums = [];
                    var s = 0;

                    for (var i = 0; i < yijiname.length; i++) {
                        //names.push(obj[i].prov);
                                        
                        var obj1 = new Object();                
                        obj1.name = arrayyiji[i];                
                        obj1.value = value1[i];                
                        nums.push(obj1);
                    }

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, arrayyiji, nums, "面积");




                                        
                }                
            }            
        });
    }

    this.getStatisticsData14 = function(title, xzq) {
        $("#table2").empty();
        var obj = {
            stype: "K14",
            mtype: "新数据",
            xzq: xzq,
            text: "'湿地'"
        };
        var perValue = [];
        var perColName = [];
        var landname = [];
        var myparam = "";

        var Landtype = []; //二级地类
        var Fatherlandtype = []; //一级地类
        var Fathervalue = [];
        var FatherName = [];
        var Childvalue = [];
        var Myland = [];
        var Theparam = "";
        var mylandvalue = [];
        var x = [];
        var xingzhengqudata = []; //x坐标值
        var seriesdata = []; //y坐标值
        var hejiData = [];
        var newValue = [];
        var aparam = "";

        var mynums = [];
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            Landtype = strs[2];
                        else if (i == 3)
                            Fatherlandtype = strs[3];
                        else if (i == 4)
                            Myland = strs[4];
                        else
                            Theparam = strs[5];
                    }

                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    hejiData = perValue1;
                    aparam = "";
                    aparam = perValue1[0].MC;
                    var landtype = JSON.parse(Landtype);
                    var fatherlandtype = JSON.parse(Fatherlandtype);
                    var myland = JSON.parse(Myland);
                    var newmyland = [];
                    for (var i = 0; i < myland.length; i++) {
                        newmyland.push(myland[i].FD_VALUE);
                    }
                    var theparam = "K" + Theparam;

                    var tbody = document.getElementById('table2');

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据 
                        var trow = getSumDataRow(i, perValue1[i]); //定义一个方法,返回tr数据 
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                        var trow = getDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据 
                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData14(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }

                    for (var i in perValue1[0]) {
                        if (i.indexOf(theparam) != -1)
                            mylandvalue.push(perValue1[0][i]);
                    }
                    mylandvalue.shift();
                    var mypercent = [];
                    for (var i = 0; i < myland.length; i++) {
                        mypercent.push(Number(mylandvalue[i] / perValue1[0].K01).toFixed(3));
                    }
                    //var mynums = [];
                    for (var i = 0; i < newmyland.length; i++) {            
                        var obj1 = new Object();              
                        obj1.name = newmyland[i];             
                        obj1.value = mylandvalue[i];             
                        mynums.push(obj1);
                    }
                    for (var i in hejiData[0]) {
                        if (i == "SUM(K09)" || i == "K09")
                            continue;

                        if (i.match("SUM")) {
                            if (i.match("K") && i.length == 8) {
                                newValue.push(hejiData[0][i]);
                            }
                        } else {
                            if (i.match("K") && i.length == 3) {
                                newValue.push(hejiData[0][i]);
                            }
                        }
                    }

                    for (var i = 0; i < FatherName.length; i++) {             
                        var obj1 = new Object();              
                        obj1.name = FatherName[i];              
                        obj1.value = newValue[i];              
                        mynums.push(obj1);
                    }

                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, FatherName, newValue, "面积");


                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, FatherName, mynums, "面积");



                }
                statisticepage();
            }

        })

    }

    this.getStatisticsData15 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var fatherlandname = [];
        var fatherlandvalue = [];
        var myparam = "";

        var Landtype = [];
        var Fathervalue = [];
        var Childvalue = [];

        var newValue = [];
        var mynums = [];
        var nums = [];

        var obj = {
            stype: "K15",
            mtype: "数据表",
            xzq: xzq
        };
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj,
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    var fatherland;
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            fatherland = JSON.parse(strs[2]);

                    }

                    for (var i = 0; i < fatherland.length; i++) {
                        //                    var newOption = document.createElement("option");
                        //                    newOption.text = fatherland[i].FD_VALUE;
                        fatherlandname.push(fatherland[i].FD_VALUE);
                        //                    document.getElementById("selection").add(newOption);
                        fatherlandvalue.push(fatherland[i].FD_VALUE);
                    }

                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var tbody = document.getElementById('table2');
                    myparam = perValue1[0].MC;

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据

                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData15(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }
                }
                statisticepage();
            }

        });


        var value1 = [];
        var xAxis1 = [];
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data:   //发送到服务器的参数
            {
                stype: "K15",
                mtype: "新图",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            Fathervalue = strs[0];
                        else if (i == 1)
                            Childvalue = strs[1];
                    }

                    var fathervalue = JSON.parse(Fathervalue);
                    var childvalue = JSON.parse(Childvalue);
                    var newfathervalue = [];

                    for (var i in fathervalue[0]) {

                        if (i.match("SUM")) {
                            if (i.match("K") && i.length == 8) {
                                newValue.push(fathervalue[0][i]);
                            }
                        } else {
                            if (i.match("K") && i.length == 3) {
                                newValue.push(fathervalue[0][i]);
                            }

                        }
                    }

                    fatherlandname[0] = "耕地";
                    fatherlandname[1] = "湿地";

                    for (var i = 0; i < fatherlandname.length; i++) {             
                        var obj1 = new Object();              
                        obj1.name = fatherlandname[i];              
                        obj1.value = newValue[i];              
                        nums.push(obj1);
                    }

                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, fatherlandname, newValue, "面积");

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    //EchartsTitle = title + "饼形图";
                    //document.getElementById("echartslable").innerHTML = EchartsTitle;
                    showEchartsPie(echartsDiv2, fatherlandname, nums, "面积");


                }
            }

        });

    }

    this.getStatisticsData17 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var myparam = "";
        var Landtype = [];
        var Landtype2 = [];
        var FQValue = [];
        var LJValue = [];
        var Landname = [];
        var FQLandname = [];
        var LJLandname = [];
        var obj = {
            stype: "K17",
            mtype: "数据表",
            xzq: xzq
        };

        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: obj, //发送到服务器的参数        
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            Landname = JSON.parse(strs[2]);
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    var tbody = document.getElementById('table2');
                    myparam = perValue1[0].MC;

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据
                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData17(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }

                        tbody.appendChild(trow);
                    }

                    for (var j in Landname) {
                        if (Landname[j].FIELDALIASNAME.match("小计")) {
                            continue;
                        }
                        if (Landname[j].FIELDALIASNAME.match("FQ")) {
                            FQLandname.push(Landname[j].FIELDALIASNAME.split('_')[1]);
                        } else if (Landname[j].FIELDALIASNAME.match("LJTM")) {
                            LJLandname.push(Landname[j].FIELDALIASNAME.split('_')[1]);
                        } else
                            continue;
                    }

                    for (var j in perValue1[0]) {
                        if (j == "DM" || j == "MC") {
                            continue;
                        }
                        if (j.match("SUM")) {
                            if (j.match("FQ")) {
                                if (j.match("_XJ"))
                                    continue;
                                FQValue.push(perValue1[0][j]);
                            } else if (j.match("LJTM")) {
                                if (j.match("_XJ"))
                                    continue;
                                LJValue.push(perValue1[0][j]);
                            } else
                                continue;
                        } else {
                            if (j.match("FQ")) {
                                if (j.match("_XJ"))
                                    continue;
                                FQValue.push(perValue1[0][j]);
                            } else if (j.match("LJTM")) {
                                if (j.match("_XJ"))
                                    continue;
                                LJValue.push(perValue1[0][j]);
                            } else
                                continue;
                        }
                    }
                    //var EchartsTitle = "";
                    //document.getElementById("echartslable").innerHTML = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, FQLandname, FQValue, "面积");

                    //document.getElementById("EchartsPieDiv").style.display = "block";
                    var echartsDiv2 = document.getElementById("piediv");
                    showEchartsBar(echartsDiv2, LJLandname, LJValue, "面积");



                }
                statisticepage();
            }

        });

    }

    this.getStatisticsData18 = function(title, xzq) {
        $("#table2").empty();
        var perValue = [];
        var perColName = [];
        var myparam = "";

        var alldata = []; //x坐标值
        var xdata = []; //x坐标值
        var seriesdata = []; //y坐标值
        var seriesdata2 = []; //y坐标值



        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
                stype: "K18",
                mtype: "数据表",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组
                    strs = result.split("||"); //字符分割
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            perValue = strs[0];
                        else if (i == 1)
                            perSumValue = strs[1];
                        else if (i == 2)
                            alldata = JSON.parse(strs[2]);
                    }
                    var perSumValue = JSON.parse(perSumValue);
                    var perValue1 = JSON.parse(perValue);
                    myparam = perSumValue[0].MC;

                    var tbody = document.getElementById('table2');

                    for (var i = 0; i < perValue1.length; i++) { //遍历一下json数据
                        var trow = getDataRow(i, perValue1[i]); //定义一个方法,返回tr数据
                        tbody.appendChild(trow);
                    }

                    trow = getNullDataRow(1, perValue1[0]); //定义一个方法,返回tr数据
                    tbody.appendChild(trow);

                    for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据
                        var trow = getSumDataRow(i, perSumValue[i]); //定义一个方法,返回tr数据
                        if ((perSumValue[i].DM).toString().length <= 9) {
                            trow.setAttribute("onclick", "getStatisticsData18(" + "'" + title + "'" + "," + "'" + perSumValue[i].DM + "'" + ")");
                        } else {
                            trow.setAttribute("onclick", "javascript:location.href=('#');");
                        }
                        tbody.appendChild(trow);
                    }

                    for (var j in alldata) {
                        xdata.push(alldata[j].FIELDALIASNAME.split('_')[1]);
                    }
                    xdata.shift();
                    for (var j in perValue1[0]) {
                        if (j == "DM" || j == "MC") {
                            continue;
                        }
                        if (j.match("SUM")) {
                            if (j.match("GCHF")) {
                                if (j.match("_XJ"))
                                    continue;
                                seriesdata.push(perValue1[0][j]);
                            } else if (j.match("JKHF")) {
                                if (j.match("_XJ"))
                                    continue;
                                seriesdata2.push(perValue1[0][j]);
                            } else
                                continue;
                        } else {
                            if (j.match("GCHF")) {
                                if (j.match("_XJ"))
                                    continue;
                                seriesdata.push(perValue1[0][j]);
                            } else if (j.match("JKHF")) {
                                if (j.match("_XJ"))
                                    continue;
                                seriesdata2.push(perValue1[0][j]);
                            } else
                                continue;
                        }

                    }

                    //var EchartsTitle = "";
                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar(echartsDiv, xdata, seriesdata2, "面积");

                }
                statisticepage();
            }
        })
    }

    this.getStatisticsDataThreeType = function(title, xzq) {
        $("#table2").empty();
        var xzq1;
        var xzq2;
        var xzq3;
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
                stype: "sandalei",
                mtype: "数据表",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var totaldata = result.split('||');
                    var data1 = totaldata[0];
                    var data2 = totaldata[1];
                    var data3 = totaldata[2];

                    var citydata = JSON.parse(data1);
                    var countydata = JSON.parse(data2);
                    var villagedata = JSON.parse(data3);


                    var tbody = document.getElementById('table2');
                    //市数据，柱状图应该显示县的内容
                    for (var i = 0; i < citydata.length; i++) {
                        var trow = getCityDataRow(i, citydata[i]);
                        xzq1 = citydata[i].DM;
                        // trow.setAttribute("onclick", "ChildDataSearch("+xzq1+")");
                        // tbody.appendChild(trow);
                        tbody.appendChild(trow);
                        $(trow).on('click', function() {
                            ChildDataSearch(xzq1)
                        })
                    }
                    //县数据,柱状图应该显示镇的内容
                    for (var i = 0; i < countydata.length; i++) {
                        var trow = getCountyDataRow(i, countydata[i]);
                        xzq2 = countydata[i].DM;
                        // trow.setAttribute("onclick", "ChildDataSearch("+xzq2+")");
                        // tbody.appendChild(trow);
                        tbody.appendChild(trow);
                        $(trow).on('click', function() {
                            ChildDataSearch(xzq2)
                        })
                    }
                    //镇数据,柱状图应该显示村的内容
                    for (var i = 0; i < villagedata.length; i++) {
                        var trow = getVillageDataRow(i, villagedata[i]);
                        xzq3 = villagedata[i].DM;
                        // trow.setAttribute("onclick", "ChildDataSearch("+xzq3+")");
                        let a = villagedata[i].DM;
                        tbody.appendChild(trow);
                        $(trow).on('click', function() {
                            ChildDataSearch(a, trow)
                        })
                    }

                    ChildDataSearch(xzq);


                    function getCityDataRow(i, citydata) {
                        var row = document.createElement('tr');
                        //var idCell = document.createElement('td');
                        //idCell.innerHTML = i;
                        //row.appendChild(nameCell);
                        for (var j in citydata) {
                            var nameCell = document.createElement('td');
                            nameCell.setAttribute("style", "border: 1px solid #060709;");
                            nameCell.innerHTML = citydata[j];
                            row.appendChild(nameCell);
                        }
                        return row;
                    }

                    function getCountyDataRow(i, countydata) {
                        var row = document.createElement('tr');
                        //var idCell = document.createElement('td');
                        //idCell.innerHTML = i;
                        //row.appendChild(nameCell);
                        for (var j in countydata) {
                            var nameCell = document.createElement('td');
                            nameCell.setAttribute("style", "border: 1px solid #060709;");
                            nameCell.innerHTML = countydata[j];
                            row.appendChild(nameCell);
                        }
                        return row;
                    }

                    function getVillageDataRow(i, villagedata) {
                        var row = document.createElement('tr');
                        //var idCell = document.createElement('td');
                        //idCell.innerHTML = i;
                        //row.appendChild(nameCell);
                        $(row).attr("xzq", villagedata.DM);
                        for (var j in villagedata) {
                            var nameCell = document.createElement('td');
                            nameCell.setAttribute("style", "border: 1px solid #060709;");
                            nameCell.innerHTML = villagedata[j];
                            row.appendChild(nameCell);
                        }
                        return row;
                    }




                }
                statisticepage();
            }

        });
    }

    function ChildDataSearch(xzq5, trow) {
        if (trow && trow.hasOwnProperty("xzq"))
        //ChildDataSearch(a,$(trow).attr(""))
            xzq5 = $(trow).attr("xzq")
        xzq = xzq5;
        var typenames = []; //地的类型
        var xingzhengqudata = []; //x坐标值
        var seriesdata = []; //y坐标值 
        var color = ['#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed',
            '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0',
            '#1e90ff', '#ff6347', '#7b68ee', '#00fa9a', '#ffd700',
            '#6699FF', '#ff6666', '#3cb371', '#b8860b', '#30e0e0'
        ];  
        $.ajax({                
            type:   "post",
                            async:  false,
                            url:   "http://192.168.1.13:8014/Ajax.ashx",
                            data:   //发送到服务器的参数
            {
                stype: "sandalei",
                mtype: "柱状图",
                xzq: xzq
            },
                           datatype:   "json",
                           success:   function (result)  {                   
                if  (result)  {
                    var names = []; //
                    var nums = [];

                    var data1 = []; //农用地
                    var data2 = []; //建设用地
                    var data3 = []; //未利用地

                    var perValue = JSON.parse(result);
                    for (var i = 0; i < perValue.length; i++) { //遍历一下json数据                     
                        var perValue1 = perValue[i];
                        //for (var j in perValue1) {
                        xingzhengqudata.push(perValue1.MC);
                        data1.push(perValue1.NYD);
                        data2.push(perValue1.JSYD);
                        data3.push(perValue1.WLYD);
                        //}
                    }
                    var seriesdatas2 = new Object();
                    seriesdatas2["name"] = '农用地';
                    seriesdatas2["type"] = 'bar';
                    seriesdatas2["smooth"] = 'true';
                    seriesdatas2["areaStyle"] = color;
                    seriesdatas2["data"] = data1;
                    seriesdatas2["itemStyle"] = {
                        normal: {
                            label: {
                                show: true, //开启显示
                                position: 'top', //在上方显示
                                textStyle: { //数值样式
                                    color: 'white',
                                    fontSize: 12
                                }
                            }
                        }
                    };
                    seriesdata.push(seriesdatas2);
                    var seriesdatas3 = new Object();
                    seriesdatas3["name"] = '建设用地';
                    seriesdatas3["type"] = 'bar';
                    seriesdatas3["smooth"] = 'true';
                    seriesdatas3["areaStyle"] = '{}';
                    seriesdatas3["data"] = data2;
                    seriesdatas3["itemStyle"] = {
                        normal: {
                            label: {
                                show: true, //开启显示
                                position: 'top', //在上方显示
                                textStyle: { //数值样式
                                    color: 'white',
                                    fontSize: 12
                                }
                            }
                        }
                    };
                    seriesdata.push(seriesdatas3);
                    var seriesdatas4 = new Object();
                    seriesdatas4["name"] = '未利用地';
                    seriesdatas4["type"] = 'bar';
                    seriesdatas4["smooth"] = 'true';
                    seriesdatas4["areaStyle"] = '{}';
                    seriesdatas4["data"] = data3;
                    seriesdatas4["itemStyle"] = {
                        normal: {
                            label: {
                                show: true, //开启显示
                                position: 'top', //在上方显示
                                textStyle: { //数值样式
                                    color: 'white',
                                    fontSize: 12
                                }
                            }
                        }
                    };
                    seriesdata.push(seriesdatas4);

                    //document.getElementById("EchartsBarDiv").style.display = "block";
                    var echartsDiv = document.getElementById("bardiv");
                    //EchartsTitle = title + "柱形图";
                    showEchartsBar2(echartsDiv, xingzhengqudata, seriesdata, "面积");
                }
            }
        })

    }

    this.getStatisticsDataYijidilei = function(title, xzq) {
        var xzqS;
        var xzq;
        var numberRowsInTable;
        var Yeardata = [];
        var perColName = [];
        var typenames = []; //地的类型
        var xingzhengqudata = ["耕地", "园地", "林地", "草地", "交通运输用地", "水域及水利设施用地", "其他土地", "城镇村及工矿用地"]; //x坐标值
        var seriesdata = []; //y坐标值
        var alldata = [];
        var a = [];
        var b = [];
        var c = [];
        var d = [];
        var e = [];
        var f = [];
        var g = [];
        var h = [];
        alldata.push(a);
        alldata.push(b);
        alldata.push(c);
        alldata.push(d);
        alldata.push(e);
        alldata.push(f);
        alldata.push(g);
        alldata.push(h);
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
                stype: "TB_CHANGE_2TO3",
                mtype: "初始化",
                xzq: xzq,
                year: ""
                    //FD_YEAR:FD_YEAR
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            var perValue = strs[0];
                        else if (i == 1)
                            var perSumValue = strs[1];
                    }
                    var countydata = JSON.parse(perValue);
                    var yeardata = JSON.parse(perSumValue);

                    for (var i = 0; i < countydata.length; i++) {
                        var newOption = document.createElement("option");
                        newOption.text = countydata[i].XZQMC;
                        newOption.value = countydata[i].XZQDM;
                        document.getElementById("county").add(newOption);
                    }

                    for (var i = 0; i < yeardata.length; i++) {
                        var newOption = document.createElement("option");
                        newOption.text = yeardata[i].FD_YEAR;
                        document.getElementById("selection").add(newOption);
                    }
                    submit();

                }
            }
        });

        function submit() {
            var tbody = document.getElementById('table2');
            var myselect = document.getElementById("selection"); //year
            var index = myselect.selectedIndex;
            var text = myselect.options[index].text;
            //text = "'" + text + "'";
            var myselect2 = document.getElementById("county"); //year
            var index2 = myselect2.selectedIndex;
            var text2 = myselect2.options[index2].value;

            $.ajax({
                type: "post",
                async: false,
                url: "http://192.168.1.13:8014/Ajax.ashx",
                data: //发送到服务器的参数
                {
                    stype: "TB_CHANGE_2TO3",
                    mtype: "数据表",
                    county: text2,
                    year: text,
                    xzq: xzq
                        //FD_YEAR: FD_YEAR
                },
                datatype: "json",
                success: function(result) {
                    if (result) {
                        $("#table2").html("");
                        var perSumValue = JSON.parse(result);
                        var tbody = document.getElementById('table2');
                        //alldata = [];
                        seriesdata = [];
                        for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                            var trow = getSumDataRow2(i, perSumValue[i]); //定义一个方法,返回tr数据 
                            tbody.appendChild(trow);
                        }

                        for (var k = 0; k < alldata.length; k++) {
                            var o = new Object();
                            o["name"] = xingzhengqudata[k];
                            o["type"] = 'bar';
                            o["data"] = alldata[k];
                            //o["itemStyle"] = { normal: { label: {
                            //    show: true, //开启显示
                            //    position: 'top', //在上方显示
                            //    textStyle: { //数值样式
                            //        color: 'white',
                            //        fontSize: 12
                            //    },
                            //    formatter: function (params) {
                            //        if (params.value > 0) {
                            //            return params.value;
                            //        } else {
                            //            return ' ';
                            //        }
                            //    }
                            //}
                            //}
                            //};
                            seriesdata.push(o);
                        }


                        //var EchartsTitle = "";
                        //document.getElementById("EchartsBarDiv").style.display = "block";
                        var echartsDiv = document.getElementById("bardiv");
                        //EchartsTitle = title + "柱形图";
                        showEchartsBar2(echartsDiv, xingzhengqudata, seriesdata, "面积");


                    }
                }

            });
        }

        var k = 0;
        $("#county").on('change', function() {
            submit();
        })
        $("#selection").on('change', function() {
            submit();
        })





        function getSumDataRow2(i, perValue) {
            var arr = [];
            arr.push(perValue["dlbm"]);
            arr.push(perValue["hj"]);
            arr.push(perValue["01"]);
            arr.push(perValue["02"]);
            arr.push(perValue["03"]);
            arr.push(perValue["04"]);
            arr.push(perValue["10"]);
            arr.push(perValue["11"]);
            arr.push(perValue["12"]);
            arr.push(perValue["20"]);
            if (i != 0) {
                if (i == 1)
                    perValue["01"] = 0;
                if (i == 2)
                    perValue["02"] = 0;
                if (i == 3)
                    perValue["03"] = 0;
                if (i == 4)
                    perValue["04"] = 0;
                if (i == 5)
                    perValue["10"] = 0;
                if (i == 6)
                    perValue["11"] = 0;
                if (i == 7)
                    perValue["12"] = 0;
                if (i == 8)
                    perValue["20"] = 0;
                a.push(perValue["01"]);
                b.push(perValue["02"]);
                c.push(perValue["03"]);
                d.push(perValue["04"]);
                e.push(perValue["10"]);
                f.push(perValue["11"]);
                g.push(perValue["12"]);
                h.push(perValue["20"]);

            }
            k = k + 1;
            var row = document.createElement('tr'); //创建行       
            for (var j = 0; j < arr.length; j++) {
                var nameCell = document.createElement('td'); //创建第二列name
                nameCell.innerHTML = arr[j];
                nameCell.setAttribute("style", "border: 1px solid #060709;width:90px;");
                row.appendChild(nameCell);
            }
            return row; //返回tr数据   
        }
    }

    this.getStatisticsDataErjidilei = function(title, xzq) {
        var perColName = [];
        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
                stype: "TB_CHANGE_2TO3_JS2",
                mtype: "初始化",
                xzq: xzq
            },
            datatype: "json",
            success: function(result) {
                if (result) {
                    var strs = new Array(); //定义一数组 
                    strs = result.split("||"); //字符分割 
                    for (i = 0; i < strs.length; i++) {
                        if (i == 0)
                            var perValue = strs[0];
                        else if (i == 1)
                            var perSumValue = strs[1];
                        else if (i == 2)
                            var perOhterValue = strs[2];
                    }
                    var countydata = JSON.parse(perValue);
                    var yeardata = JSON.parse(perSumValue);
                    var trdata = JSON.parse(perOhterValue);

                    var mytr = document.getElementById("mytr");
                    var mytd = document.createElement("td");
                    mytd.setAttribute("style", "border: 1px solid #060709;height:20px;width:200px;");
                    mytd.innerHTML = "年变更调查~三次调查流向分析";
                    mytr.appendChild(mytd);
                    var mytd2 = document.createElement("td");
                    mytd2.setAttribute("style", "border: 1px solid #060709;height:20px;");
                    mytd2.innerHTML = "合计";
                    mytr.appendChild(mytd2);
                    for (var j = 0; j < trdata.length; j++) {
                        var mytd = document.createElement("td");
                        mytd.setAttribute("style", "border: 1px solid #060709;height:20px;");
                        mytd.innerHTML = trdata[j].DLMC;
                        mytr.appendChild(mytd);
                    }

                    for (var i = 0; i < countydata.length; i++) {
                        var newOption = document.createElement("option");
                        newOption.text = countydata[i].XZQMC;
                        newOption.value = countydata[i].XZQDM;
                        document.getElementById("county").add(newOption);
                    }

                    for (var i = 0; i < yeardata.length; i++) {
                        var newOption = document.createElement("option");
                        newOption.text = yeardata[i].FD_YEAR;
                        document.getElementById("selection").add(newOption);
                    }

                    submit(xzq);

                }
                statisticepage()
            }

        });

        function submit(xzq) {
            var tbody = document.getElementById('table2');

            var myselect = document.getElementById("selection");
            var index = myselect.selectedIndex;
            var text = myselect.options[index].text;
            //text = "'" + text + "'";
            var myselect2 = document.getElementById("county"); //year
            var index2 = myselect2.selectedIndex;
            var text2 = myselect2.options[index2].value;
            $.ajax({
                type: "post",
                async: false,
                url: "http://192.168.1.13:8014/Ajax.ashx",
                data: //发送到服务器的参数
                {
                    stype: "TB_CHANGE_2TO3_JS2",
                    mtype: "表格",
                    year: text,
                    xzq: xzq,
                    country: text2
                },
                datatype: "json",
                success: function(result) {
                    if (result) {
                        $("#table2").html("");
                        var obj;
                        //var arr = [];
                        var perSumValue = [];
                        perSumValue = JSON.parse(result);
                        for (var i = 0; i < perSumValue.length; i++) { //遍历一下json数据 
                            var trow = document.createElement('tr');
                            for (var j in perSumValue[i]) {
                                var nameCell = document.createElement('td'); //创建第二列name
                                nameCell.setAttribute("style", "border: 1px solid #060709;height:20px;width:90px;");
                                nameCell.innerHTML = perSumValue[i][j];
                                trow.appendChild(nameCell);
                            }

                            tbody.appendChild(trow);
                        }
                        var length = $(window).width() * 0.93;
                        var height = $(window).width() * 0.38;
                        FixTable("store", 2, length, height);
                    }
                }

            });

        }





        function FixTable(TableID, FixColumnNumber, width, height) {
            if ($("#" + TableID + "_tableLayout").length != 0) {
                $("#" + TableID + "_tableLayout").before($("#" + TableID));
                $("#" + TableID + "_tableLayout").empty();
            } else {
                $("#" + TableID).after("<div id='" + TableID + "_tableLayout' style='overflow:hidden;height:" + height + "px; width:" + width + "px;'></div>");
            }
            $('<div id="' + TableID + '_tableFix"></div>' +
                '<div id="' + TableID + '_tableHead"></div>' +
                '<div id="' + TableID + '_tableColumn"></div>' +
                '<div id="' + TableID + '_tableData"></div>').appendTo("#" + TableID + "_tableLayout");
            var oldtable = $("#" + TableID);
            var tableFixClone = oldtable.clone(true);
            tableFixClone.attr("id", TableID + "_tableFixClone");
            $("#" + TableID + "_tableFix").append(tableFixClone);
            var tableHeadClone = oldtable.clone(true);
            tableHeadClone.attr("id", TableID + "_tableHeadClone");
            $("#" + TableID + "_tableHead").append(tableHeadClone);
            var tableColumnClone = oldtable.clone(true);
            tableColumnClone.attr("id", TableID + "_tableColumnClone");
            $("#" + TableID + "_tableColumn").append(tableColumnClone);
            $("#" + TableID + "_tableData").append(oldtable);
            $("#" + TableID + "_tableLayout table").each(function() {
                $(this).css("margin", "0");
            });
            var HeadHeight = $("#" + TableID + "_tableHead thead").height();
            HeadHeight += 2;
            $("#" + TableID + "_tableHead").css("height", HeadHeight);
            $("#" + TableID + "_tableFix").css("height", HeadHeight);
            var ColumnsWidth = 0;
            var ColumnsNumber = 0;
            $("#" + TableID + "_tableColumn tr:last td:lt(" + FixColumnNumber + ")").each(function() {
                ColumnsWidth += $(this).outerWidth(true);
                ColumnsNumber++;
            });
            ColumnsWidth += 2;
            checkVersion();
            $("#" + TableID + "_tableColumn").css("width", ColumnsWidth);
            $("#" + TableID + "_tableFix").css("width", ColumnsWidth);
            $("#" + TableID + "_tableData").scroll(function() {
                $("#" + TableID + "_tableHead").scrollLeft($("#" + TableID + "_tableData").scrollLeft());
                $("#" + TableID + "_tableColumn").scrollTop($("#" + TableID + "_tableData").scrollTop());
            });
            $("#" + TableID + "_tableFix").css({ "overflow": "hidden", "position": "relative", "z-index": "50", "background-color": "#2a5d8e" });
            $("#" + TableID + "_tableHead").css({ "overflow": "hidden", "width": width - 17, "position": "relative", "z-index": "45", "background-color": "#2a5d8e" });
            $("#" + TableID + "_tableColumn").css({ "overflow": "hidden", "height": height - 17, "position": "relative", "z-index": "40", "background-color": "#2a5d8e" });
            $("#" + TableID + "_tableData").css({ "overflow": "scroll", "width": width, "height": height, "position": "relative", "z-index": "35" });
            if ($("#" + TableID + "_tableHead").width() > $("#" + TableID + "_tableFix table").width()) {
                $("#" + TableID + "_tableHead").css("width", $("#" + TableID + "_tableFix table").width());
                $("#" + TableID + "_tableData").css("width", $("#" + TableID + "_tableFix table").width() + 17);
            }
            if ($("#" + TableID + "_tableColumn").height() > $("#" + TableID + "_tableColumn table").height()) {
                $("#" + TableID + "_tableColumn").css("height", $("#" + TableID + "_tableColumn table").height());
                $("#" + TableID + "_tableData").css("height", $("#" + TableID + "_tableColumn table").height() + 17);
            }
            $("#" + TableID + "_tableFix").offset($("#" + TableID + "_tableLayout").offset());
            $("#" + TableID + "_tableHead").offset($("#" + TableID + "_tableLayout").offset());
            $("#" + TableID + "_tableColumn").offset($("#" + TableID + "_tableLayout").offset());
            $("#" + TableID + "_tableData").offset($("#" + TableID + "_tableLayout").offset());
        }

        function getInternetExplorerVersion() {
            var rv = -1; // Return value assumes failure.

            if (navigator.appName == 'Microsoft Internet Explorer') {
                var ua = navigator.userAgent;
                var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
                if (re.exec(ua) != null)
                    rv = parseFloat(RegExp.$1);
            }
            return rv;
        }

        function checkVersion() {
            var ver = getInternetExplorerVersion();
            if (ver > -1) {
                if (ver >= 8.0) {
                    if (ColumnsNumber >= 2) ColumnsWidth--;
                } else {
                    if (ColumnsNumber >= 3) ColumnsWidth--;
                }
            }
        }

    }

    this.getStatisticsDataZhuanTi = function(title, xzq){
        var str1 = "";
        var str2 = "";
        var str3 = "";
        var str4 = "";

        var dataarray = []; // 存放二调树的一级的nodes
        var childdata = []; //存放二调树的二级的nodes

        var Citydata = [];
        var Countydata = [];
        var Yeardata = []; 
        var Themedata = [];

        var realcity = [];
        var allCounty = [];

        var Cityname = [];
        var Countyname = [];
        var Cityname2 = [];
        var Countyname2 = [];
        var Initdata = [];

        $.ajax({
            type: "post",
            async: false,
            url: "http://192.168.1.13:8014/Ajax.ashx",
            data: //发送到服务器的参数
            {
            stype: "K21",
            mtype: "初始化",
            xzq: xzq
        },
        datatype: "json",
        success: function (result) {
            if (result) {
                var strs = new Array(); //定义一数组 
                strs = result.split("||"); //字符分割 
                for (i = 0; i < strs.length; i++) {
                    if (i == 0)
                        Citydata = strs[0];
                    else if (i == 1)
                        Countydata = strs[1];
                    else if (i == 2)
                        Yeardata = strs[2];
                    else if (i == 3)
                        Themedata = strs[3];
                      else if(i ==4)
                          Initdata = strs[4];
                }
                var citydata = JSON.parse(Citydata);
                var countydata = JSON.parse(Countydata);
                var yeardata = JSON.parse(Yeardata);
                var themedata = JSON.parse(Themedata);
                var initdata = JSON.parse(Initdata);

                var c1 = [];
                var c2 = [];//对countyname，countyname2处理，再存放
                var c3 = [];
                var c4 = [];//对countyname，countyname2处理，再存放
                c3.push("请选择县");
                c3.push("全部");
                c4.push("请选择县");

                for(var i=0;i<countydata.length;i++){
                    c3.push(countydata[i].XZQMC)
                }

                realcity.push(citydata[0].DSMC);

                allCounty.push(c3);

                function init(){
                 for (var i = 0; i < realcity.length; i++) {
                    var newOption = document.createElement("option");
                    newOption.style.color="black";
                    newOption.style.cursor="pointer";
                    newOption.text = realcity[i];                    
                    document.getElementById("select1").add(newOption);
                 }

                 for (var i = 0; i < countydata.length; i++) {
                     var newOption = document.createElement("option");
                     newOption.style.color = "black";
                     newOption.style.cursor = "pointer";
                     newOption.text = countydata[i].XZQMC;
                     document.getElementById("select2").add(newOption);
                 }

                for (var i = 0; i < yeardata.length; i++) {
                    var newOption = document.createElement("option");
                    newOption.style.color = "black";
                    newOption.text = yeardata[i].FD_YEAR;
                    document.getElementById("selection").add(newOption);
                }

                for (var i = 0; i < themedata.length; i++) {
                    var newOption = document.createElement("option");
                    newOption.style.color = "black";
                    newOption.text = themedata[i].ZTMC;
                    document.getElementById("select3").add(newOption);
                }
                }
                init();


                
                 $("#table2").html(""); //清空tbody内容，所以下次查询时不会有上次的重复的记录
                    xingzhengqudata = []; //x坐标值
                    seriesdata = []; //y坐标值 
                    _array = [];
                    data = [];
                    area = [];
                    percent = [];
                    s = 0;
                    data = result;
                    _array = JSON.parse(Initdata);
                    var tbody = document.getElementById('table2');


                    for (var i = 0; i < _array.length; i++) {
                        area.push(parseFloat(_array[i].MJ3));
                        s = s + parseFloat(_array[i].MJ3);
                    }
                    for (var i = 0; i < area.length; i++) {
                        if (s != 0) {
                            var m = ((area[i]* 100 / s).toFixed(4) ) + "%";                         
                            percent.push(m);
                        }
                    }
                    for (var i = 0; i < _array.length; i++) {
                        var trow = getDataRow(i, _array[i], percent[i]);
                        tbody.appendChild(trow);
                    }
                    trow = getSumRow(); //定义一个方法,返回tr数据 
                    tbody.appendChild(trow);

                    var typenames = []; //地的类型            
                    
                    var perValue = JSON.parse(Initdata);
                    for (var i = 0; i < perValue.length; i++) {
                        xingzhengqudata.push(perValue[i].DLMC2 + "-" + perValue[i].DLMC3);
                        seriesdata.push(perValue[i].MJ3);
                    }


                    var echartsDiv = document.getElementById("bardiv");
                    showEchartsBar(echartsDiv, xingzhengqudata  , seriesdata, "面积");
            

            }
        }
        
    });
//});

 var _array = [];
    var data = [];
    var area = []; //面积
    var percent = []; //面积百分比
    var s = 0; //总和
    var xingzhengqudata = []; //x坐标值
    var seriesdata = []; //y坐标值 

    var theTable ;
    var totalPage ;
    var pageNum ;
    var spanPre ;
    var spanNext ;
    var spanFirst ;
    var spanLast ;
    var numberRowsInTable ;
    var pageSize = 8;
    var page = 1;
               function selectCounty(){
                   var mycity = document.getElementById("select1");
                   var mycounty = document.getElementById("select2");
                   mycounty.options.length=0;
                   var selectParam = allCounty[mycity.selectedIndex-1];
                   //document.getElementById("select2").length = 1;
                   for(var i = 0 ; i < selectParam.length ; i++){
                     var  newOption = new Option(selectParam[i],selectParam[i]);
                     newOption.style.color="black";
                     newOption.style.cursor="pointer";
                     mycounty.appendChild(newOption);
                   }
             }
             var area = [];
             var percent = [];
             var land23 = [];
             var s = 0;
   
             
             function submit() {
                 var param1 = document.getElementById("select1");
                 var param2 = document.getElementById("select2");
                 var param3 = document.getElementById("selection");
                 var param4 = document.getElementById("select3");
                 str1 = param1.options[param1.selectedIndex].text;
                 str2 = param2.options[param2.selectedIndex].text;
                 str3 = param3.options[param3.selectedIndex].text;
                 str4 = param4.options[param4.selectedIndex].text;
        
             if(str1=="请选择市"||str2=="请选择县"||str3=="请选择年份"||str4=="请选择专题"){
                 alert("选择条件不全，请重新选择");
             }
                 $.ajax({
                     type: "post",
                     async: false,
                     url: "http://192.168.1.13:8014/paramajax.ashx",
                     data: //发送到服务器的参数
            {
            mtype: "查询",
            str1: str1,
            str2: str2,
            str3: str3,
            str4: str4
        },
                     datatype: "json",
                     success: function (result) {
                         if (result) {
                             $("#table2").html("");
                              area = [];
                              percent = [];
                              land23 = [];
                              s = 0;
                             var datatable = JSON.parse(result);
                             for (var i = 0; i < datatable.length; i++) {
                                 area.push(parseFloat(datatable[i].MJ3));
                                 s = s + parseFloat(datatable[i].MJ3);
                             }
                             for (var i = 0; i < area.length;i++ ) {
                                 var m = (area[i] * 100 / s ).toFixed(4) + "%";
                                 percent.push(m);
                             }
                             var tbody = document.getElementById("table2")
                             for (var i = 0; i < datatable.length; i++) {
                                 var row = document.createElement('tr'); //创建行 
                                 for (var j in datatable[i]) {
                                     var nameCell = document.createElement('td');
                                     nameCell.setAttribute("style", "border: 1px solid #060709;");
                                     nameCell.innerHTML = datatable[i][j];
                                     row.appendChild(nameCell);
                                 }
                                 var idCell = document.createElement('td'); //创建最后一列id 
                                 idCell.setAttribute("style", "border: 1px solid #060709;");
                                 idCell.innerHTML = percent[i]; //填充数据 
                                 row.appendChild(idCell); //加入行 ，下面类似
                                 tbody.appendChild(row);
                             }
                            var trow = getSumRow(); //定义一个方法,返回tr数据 
                             tbody.appendChild(trow);



                             for (var i = 0; i < datatable.length; i++) {
                                    land23.push(datatable[i].DLMC2 + "-" + datatable[i].DLMC3);
                                }


                                   

                                var echartsDiv = document.getElementById("bardiv");
                                showEchartsBar(echartsDiv, land23  , area, "面积");
                                

                            }
                        },

                    })
                 }
                 
                 function getSumRow() {
                    var row = document.createElement('tr');
                    row.setAttribute("style", " background-color: #2a5d8e;");
            
                    var id1 = document.createElement('td');
                    id1.setAttribute("style", "border: 1px solid #060709;");
                    id1.innerHTML = "合计";
                    row.appendChild(id1);
            
                    var id2 = document.createElement('td');
                    id2.setAttribute("style", "border: 1px solid #060709;");
                    id2.innerHTML = "&nbsp";
                    row.appendChild(id2);
            
                    var id3 = document.createElement('td');
                    id3.setAttribute("style", "border: 1px solid #060709;");
                    id3.innerHTML = "&nbsp";
                    row.appendChild(id3);
            
                    var id4 = document.createElement('td');
                    id4.setAttribute("style", "border: 1px solid #060709;");
                    id4.innerHTML = "&nbsp";
                    row.appendChild(id4);
            
                    var id5 = document.createElement('td');
                    id5.setAttribute("style", "border: 1px solid #060709;");
                    id5.innerHTML = Math.round(s);
                    row.appendChild(id5);
            
                    var id6 = document.createElement('td');
                    id6.setAttribute("style", "border: 1px solid #060709;");
                    id6.innerHTML = "100%";
                    row.appendChild(id6);
            
                    return row;
                }
                function createTable(){
                    var mytable = document.createElement("table");
                    mytable.setAttribute("align","center");
                    mytable.setAttribute("style","width: 92%; height: 30px;text-align:center;");
                    var mytr = document.createElement("tr");
                    mytr.setAttribute("align","center");
                    mytr.setAttribute("style","background-color: #295d8e;text-align: center;");
                    var myth1 = document.createElement("th");
                    var myth2 = document.createElement("th");
                    var myth3 = document.createElement("th");
                    var myth4 = document.createElement("th");
                    var myth5 = document.createElement("th");
                    myth1.setAttribute("style","width:44px;");
                    myth2.setAttribute("style","width:60px;");
                    myth3.setAttribute("style","width:60px;");
                    myth4.setAttribute("style","width:44px;");
                    myth5.setAttribute("style","float: right; display: inline; margin-right: 10px; border: 0px; color: White;margin-top: 5px;");
                    myth1.setAttribute("class","tabletd");
                    myth2.setAttribute("class","tabletd");
                    myth3.setAttribute("class","tabletd");
                    myth4.setAttribute("class","tabletd");
                    myth5.setAttribute("class","tabletd");
            
                    var myspan1 = document.createElement("span");
                    myspan1.setAttribute("id","spanFirst");
                    myspan1.innerHTML = "首页";
                    myspan1.setAttribute("style","text-align:center;");
                    myth1.appendChild(myspan1);
                    var myspan2 = document.createElement("span");
                    myspan2.setAttribute("id","spanPre");
                    myspan2.innerHTML = "上一页";
                    myth2.appendChild(myspan2);
                    var myspan3 = document.createElement("span");
                    myspan3.setAttribute("id","spanNext");
                    myspan3.innerHTML = "下一页";
                    myth3.appendChild(myspan3);
                    var myspan4 = document.createElement("span");
                    myspan4.setAttribute("id","spanLast");
                    myspan4.innerHTML = "末页";
                    myth4.appendChild(myspan4);
                    var myspan5 = document.createElement("span");
                    myspan5.setAttribute("id","spanPageNum");
                    //myth1.appendChild(myspan1);
                    var myspan6 = document.createElement("span");
                    myspan6.setAttribute("id","spanTotalPage");
                    //myth1.appendChild(myspan1);
                    var myfont1 = document.createElement("font");
                    myfont1.innerHTML = "第";
                    var myfont2 = document.createElement("font");
                    myfont2.innerHTML = "页/共";
                    var myfont3 = document.createElement("font");
                    myfont3.innerHTML = "页";
                    myth5.appendChild(myfont1);
                    myth5.appendChild(myspan5);
                    myth5.appendChild(myfont2);
                    myth5.appendChild(myspan6);
                    myth5.appendChild(myfont3);
            
                    mytr.appendChild(myth1);
                    mytr.appendChild(myth2);
                    mytr.appendChild(myth3);
                    mytr.appendChild(myth4);
                    mytr.appendChild(myth5);
                    mytable.appendChild(mytr);
                    document.getElementById("page").appendChild(mytable);
                }
            
    }

    function getDataRow(i, perValue) {
        var row = document.createElement('tr'); //创建行
        //row.setAttribute("height", "40px");
        var idCell = document.createElement('td'); //创建第一列id
        idCell.setAttribute("style", "display:none;border: 1px solid #060709;");
        idCell.innerHTML = i + 3; //填充数据
        row.appendChild(idCell); //加入行 ，下面类似
        for (var j in perValue) {
            var nameCell = document.createElement('td'); //创建第二列name
            nameCell.setAttribute("style", "border: 1px solid #060709;");
            nameCell.innerHTML = perValue[j];
            row.appendChild(nameCell);
        }
        return row; //返回tr数据
    }

    function getSumDataRow(i, perValue) {
        var row = document.createElement('tr'); //创建行
        var idCell = document.createElement('td'); //创建第一列id
        //idCell.attributes['display'] = 'none';
        idCell.setAttribute("style", "display:none;border: 1px solid #060709;");
        idCell.innerHTML = i + 1; //填充数据
        row.appendChild(idCell); //加入行 ，下面类似
        for (var j in perValue) {
            var nameCell = document.createElement('td'); //创建第二列name
            nameCell.setAttribute("style", "border: 1px solid #060709;cursor:pointer;");
            nameCell.innerHTML = perValue[j];
            row.appendChild(nameCell);
        }
        //到这里，json中的数据已经添加到表格中
        return row; //返回tr数据
    }

    function getNullDataRow(i, perValue) {
        var row = document.createElement('tr'); //创建行
        var idCell = document.createElement('td'); //创建第一列id
        idCell.setAttribute("style", "display:none;border: 1px solid #060709;");
        //idCell.innerHTML = '&nbsp;';
        row.appendChild(idCell); //加入行 ，下面类似
        if (i == 1) {
            for (var j in perValue) {
                var nameCell = document.createElement('td'); //创建第二列name
                nameCell.setAttribute("style", "border: 1px solid #060709;");
                nameCell.innerHTML = " &nbsp; ";
                row.appendChild(nameCell);
            }
        }
        //到这里，json中的数据已经添加到表格中
        return row; //返回tr数据
    }



    //固定图标
    $('#LayerTree-main-form-fixed-right').click(function() {
            layerControlWindowFixed();
        })
        //关闭
    $('#LayerTree-main-form-closebutton-right').click(function() {
        statisticsTreeDiv.style.display = "none";
    })
    var layerControlWindowIsFixed = false;

    function layerControlWindowFixed() {
        if (layerControlWindowIsFixed) {
            $("#LayerTree-main-form-fixed-right").removeClass();
            $("#LayerTree-main-form-fixed-right").addClass("LayerTree-main-form-fixed");
            $("#LayerTree-main-form-fixed-right").attr("title", "固定");
        } else {
            $("#LayerTree-main-form-fixed-right").removeClass();
            $("#LayerTree-main-form-fixed-right").addClass("LayerTree-main-form-fixed-lock");
            $("#LayerTree-main-form-fixed-right").attr("title", "取消固定");
        }
        //layerControlFixed(layerControlWindowIsFixed);
        layerControlWindowIsFixed = !layerControlWindowIsFixed;
    }


}

function statisticepage() {
    theTable = document.getElementById("table2");
    totalPage = document.getElementById("spanTotalPage");
    pageNum = document.getElementById("spanPageNum");
    spanPre = document.getElementById("spanPre");
    spanNext = document.getElementById("spanNext");
    spanFirst = document.getElementById("spanFirst");
    spanLast = document.getElementById("spanLast");
    numberRowsInTable = theTable.rows.length;
    pageSize = 3;
    page = 1;

    hide();
}
//下一页
function next() {
    if (numberRowsInTable <= pageSize) {
        return;
    } else {
        hideTable();
        currentRow = pageSize * page;
        maxRow = currentRow + pageSize;
        if (maxRow > numberRowsInTable) maxRow = numberRowsInTable;
        for (var i = currentRow; i < maxRow; i++) {
            theTable.rows[i].style.display = '';
        }
        page++;
        if (maxRow == numberRowsInTable) {
            nextText();
            lastText();
        }
        showPage();
        preLink();
        firstLink();
    }

}
//上一页
function pre() {
    if (page == 1) {
        return;
    }
    hideTable();
    page--;
    currentRow = pageSize * page;
    maxRow = currentRow - pageSize;
    if (currentRow > numberRowsInTable) currentRow = numberRowsInTable;
    for (var i = maxRow; i < currentRow; i++) {
        theTable.rows[i].style.display = '';
    }
    if (maxRow == 0) {
        preText();
        firstText();
    }
    showPage();
    nextLink();
    lastLink();
}
//第一页
function first() {
    hideTable();
    page = 1;
    for (var i = 0; i < pageSize; i++) {
        theTable.rows[i].style.display = '';
    }
    showPage();
    preText();
    nextLink();
    lastLink();
}
//最后一页
function last() {
    hideTable();
    page = pageCount();
    currentRow = pageSize * (page - 1);
    for (var i = currentRow; i < numberRowsInTable; i++) {
        theTable.rows[i].style.display = '';
    }
    showPage();
    preLink();
    nextText();
    firstLink();
}


function hideTable() {
    for (var i = 0; i < numberRowsInTable; i++) {
        theTable.rows[i].style.display = 'none';
    }
}

function showPage() {
    pageNum.innerHTML = page;
}
//总共页数
function pageCount() {
    var count = 0;
    if (numberRowsInTable % pageSize != 0) count = 1;
    return parseInt(numberRowsInTable / pageSize) + count;
}
//显示链接
function preLink() { spanPre.innerHTML = "<a href='javascript:pre();' class='paging' style='color:white;text-decoration:none;'>上一页</a>"; }

function preText() { spanPre.innerHTML = "上一页"; }

function nextLink() { spanNext.innerHTML = "<a href='javascript:next();' class='paging' style='color:white;text-decoration:none;'>下一页</a>"; }

function nextText() { spanNext.innerHTML = "下一页"; }

function firstLink() { spanFirst.innerHTML = "<a href='javascript:first();' class='paging' style='color:white;text-decoration:none;'>首页</a>"; }

function firstText() { spanFirst.innerHTML = "首页"; }

function lastLink() { spanLast.innerHTML = "<a href='javascript:last();' class='paging' style='color:white;text-decoration:none;'>末页</a>"; }

function lastText() { spanLast.innerHTML = "末页"; }
//隐藏表格
function hide() {
    for (var i = pageSize; i < numberRowsInTable; i++) {
        theTable.rows[i].style.display = 'none';
    }
    totalPage.innerHTML = pageCount();
    pageNum.innerHTML = '1';
    nextLink();
    lastLink();
}




//全屏功能
function ScreenFull(){
    //$("#statisticsFullScreen").empty();
    //$("#statisticsFullScreen div").remove();
    $("#statisticsFullScreen").show();
    //if(obj === "k1"){
        //$("#statisticsFullScreen").append($("#statisticsDIV"));
        
        document.getElementById("statisticsFullScreen").appendChild(document.getElementById("statisticsDIV"));
        $("#statisticsDIV").css("width","100%");
        $("#statisticsDIV").css("height","100%");
        $("#statisticsDIV").css("left","0");
        $("#statisticsDIV").css("top","0");
    //}
}